<!--

    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.

-->
{{template "header" . }}
<div class="col-xl-10 col-lg-9 col-md-12">
  <div class="pt-4 mb-5 row">
    <div class="page-main flex-auto col">
      <div class="tag-box mb-5">
        <h3 class="mb-3">
          <a class="link-dark" href="{{$.baseURL}}/tags/{{$.tag.SlugName}}">{{$.tag.SlugName}}</a>
        </h3>
        <p class="text-break">{{formatLinkNofollow $.tag.ParsedText}}</p>
      </div>
      <div>
        <div class="mb-3 d-flex flex-wrap justify-content-between">
          <h5 class="fs-5 text-nowrap mb-3 mb-md-0">
            {{translator ($.language) "ui.question.x_questions" "count"
            .questionCount}}
          </h5>
          {{template "sort-btns" .}}
        </div>
        <div class="rounded list-group">
          {{range .questionList}}
          <div class="bg-transparent py-3 px-0 border-start-0 border-end-0 list-group-item">
            <h5 class="text-wrap text-break">
              {{if $.useTitle }}
              <a class="link-dark" href="{{$.baseURL}}/questions/{{.ID}}/{{urlTitle .Title}}">{{.Title}}</a>
              {{else}}
              <a class="link-dark" href="{{$.baseURL}}/questions/{{.ID}}">{{.Title}}</a>
              {{end}}
            </h5>
            <div class="d-flex flex-wrap flex-column flex-md-row align-items-md-center small mb-2 text-secondary">
              <div class="d-flex flex-wrap me-0 me-md-3">
                <div class="d-flex align-items-center text-secondary me-1">
                  <a href="{{$.baseURL}}/users/{{.Operator.Username}}"><span
                      class="me-1 text-break">{{.Operator.DisplayName}}</span></a><span class="fw-bold"
                    title="Reputation">{{.Operator.Rank}}</span>
                </div>
                •
                <time class="text-secondary ms-1" datetime="{{timeFormatISO $.timezone .OperatedAt}}"
                  title="{{translatorTimeFormatLongDate $.language $.timezone .OperatedAt}}">{{translator $.language
                  "ui.question.asked"}}
                  {{translatorTimeFormat $.language $.timezone .OperatedAt}}
                </time>
              </div>
              <div class="d-flex align-items-center mt-2 mt-md-0">
                <div class="d-flex align-items-center flex-shrink-0">
                  <i class="br bi-hand-thumbs-up-fill"></i>
                  <em class="fst-normal ms-1">{{.VoteCount}}</em>
                </div>
                <div class="d-flex flex-shrink-0 align-items-center ms-3">
                  <i class="br bi-chat-square-text-fill"></i>
                  <em class="fst-normal ms-1">{{.AnswerCount}}</em>
                </div>
                <span class="summary-stat ms-3 flex-shrink-0">
                  <i class="br bi-bar-chart-fill"></i>
                  <em class="fst-normal ms-1">{{.ViewCount}}</em>
                </span>
              </div>
            </div>
            <div class="question-tags mx-n1">
              {{range .Tags }}
              <a href="{{$.baseURL}}/tags/{{.SlugName}}"
                class="badge-tag rounded-1 {{if .Reserved}}badge-tag-reserved{{end}} {{if .Recommend}}badge-tag-required{{end}} m-1">
                <span class="">{{.SlugName}}</span>
              </a>
              {{end}}
            </div>
          </div>
          {{end}}
        </div>
        <div class="mt-4 mb-2 d-flex justify-content-center">
          {{template "page" .}}
        </div>
      </div>
    </div>
    <div class="page-right-side mt-4 mt-xl-0 col">
      {{template "hot-question" .}}
    </div>
  </div>
</div>
{{template "footer" .}}
